<script lang="ts" setup>
import { getBillDetailApi } from "@/apis/my"
import { onLoad } from '@dcloudio/uni-app'
import { ref } from "vue";
import { useUserStore} from '@/store/user'
const userStore = useUserStore()
const billContent = ref<any>([])
	onLoad((e)=>{
		getBillDetailApi(e?.id).then((res)=>{
			billContent.value = res
		})
	})
</script>

<template>
	<view>
		<view class="display">
			<view class="displayColumn" style="margin-left: 20rpx;">
				<text>账单名称</text>
				<text>账单类型</text>
				<!-- <text>收入/支出</text> -->
				<text>付款人名称</text>
				<text>收款人名称</text>
				<text>关联订单</text>
				<text>金额</text>
				<text>账单说明</text>
				<!-- <text>图片</text> -->
				<text>创建时间</text>
				<text>生成时间</text>
				<text>帐单状态</text>
				<!-- <text>处理人</text> -->
				<!-- <text>处理意见</text> -->
				<!-- <text>处理时间</text> -->
			</view>
			<view class="displayColumn" style="margin-left: 60rpx;">
				<view class="">{{billContent.billTypeName}}</view>
				<view class="">{{billContent.billTypeName}}</view>
				<view class="">{{billContent.paypalName}}</view>
				<view class="">{{billContent.gatherName}}</view>
				<view class="">{{billContent.billName}}</view>
				<view class="">{{billContent.amount}}</view>
				<view class="">{{billContent.billRemark}}</view>
				<view class="">{{billContent.createTime}}</view>
				<view class="">{{billContent.updateTime}}</view>
				<!-- <view class="">{{billContent.billStatus}}</view> -->
				<view class="state">{{billContent.billStatus== 1 ? "结清":billContent.billStatus==2 ? '驳回':'待结清'}}</view>
			</view>
		</view>
		<view style="width: 300rpx; margin: 20rpx auto;" v-show="userStore.user.id == billContent.paypalId">
			<u-button text="微信支付" type="primary" :plain="true" color="#2aca22"/>
		</view>
	</view>
</template>

<style>
	page{
		/* background-color: #f0f0f0; */
	}
.display{
	display: flex;
	flex-direction: row;
	/* background-color: #fff; */
	margin: 20rpx;
}
.displayColumn{
	/* width: 250rpx; */
	font-size: 31rpx;
	display: flex;
	flex-direction: column;
	
}
text{
	text-align: right;
}
</style>
